using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace LabMS.Web.Structure
{
    public partial class LabTeaching : Base.BasePage
    {
        string urlTemp = "#";
        protected void Page_Load(object sender, EventArgs e)
        {
            strPageUserType.Add("mana");
            if (UserName != "admin")
            {
                if (!HaveModulePrivilege("SYJXWD"))
                {
                    Module_SYJXWD.Visible = false;
                }

                if (!HavePrivilege("ZYPYJH"))
                {
                    Function_ZYPYJH.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../CoursePlan/ProPlanList.aspx";
                }

                if (!HavePrivilege("KCXYM"))
                {
                    Function_KCXYM.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../ClassPlan/ProjectCourseList.aspx";
                }

                if (!HavePrivilege("SYXM"))
                {
                    Function_SYXM.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../Project/ProjectList.aspx";
                }

                if (!HaveModulePrivilege("KBCX"))
                {
                    Module_KBCX.Visible = false;
                }

                if (!HavePrivilege("JSKB"))
                {
                    Function_JSKB.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../CourseQuery/TeacherQueryList.aspx";
                }

                if (!HavePrivilege("SYSKB"))
                {
                    Function_SYSKB.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../CourseQuery/LabQueryList.aspx";
                }

                if (!HavePrivilege("BJKB"))
                {
                    Function_BJKB.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../CourseQuery/ClassQueryList.aspx";
                }

                if (!HaveModulePrivilege("JXRWYAP"))
                {
                    Module_JXRWYAP.Visible = false;
                }

                if (!HavePrivilege("JXRWS"))
                {
                    Function_JXRWS.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../ClassPlan/TeachingMissionList.aspx";
                }

                if (!HavePrivilege("SYSKCAP"))
                {
                    Function_SYSKCAP.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../ClassPlan/CourseArrangeList.aspx";
                }

                if (!HavePrivilege("SYSKCTZ"))
                {
                    Function_SYSKCTZ.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../ClassPlan/UpdateCouArrange.aspx";
                }

                if (!HavePrivilege("SYSCJLR"))
                {
                    Function_SYSCJLR.Visible = false;
                }
                else if (urlTemp == "#")
                {
                    urlTemp = "../ClassPlan/ExpScoreEdit.aspx";
                }
            }
            else
            {
                urlTemp = "../CoursePlan/ProPlanList.aspx";
            }
        }

        protected string URL
        {
            get { return urlTemp; }
        }
    }
}
